package cn.edu.xmu.orderpayment.order.microservice.service;

import cn.edu.xmu.orderpayment.order.microservice.retvo.CouponActRetVo;
import cn.edu.xmu.orderpayment.order.microservice.retvo.CouponCalRetVo;
import cn.edu.xmu.orderpayment.order.microservice.vo.CouponCalVo;
import cn.edu.xmu.privilegegateway.annotation.util.InternalReturnObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author Yujie Lin
 * @date 2021/12/9 20:05
 */
@FeignClient("coupon-service")
public interface CouponService {
    @GetMapping("internal/couponactivities/{id}")
    InternalReturnObject<CouponActRetVo> getCouponActById(@PathVariable Long id);

    @PutMapping("internal/discountprices")
    InternalReturnObject<List<CouponCalRetVo>> calculateDiscount(@RequestBody List<CouponCalVo> vo);
}
